<template>
<div style="width: 1200px;margin-left: 10px">
  <el-card>
    <el-row :gutter="10">
      <el-col :span="22">
        <h1>批量添加柜机</h1>
      </el-col>
      <el-col :span="2">
        <i class="el-icon-delete-solid" style="margin-bottom: 50px; color: deepskyblue">返回</i>
      </el-col>
    </el-row>
    <hr>
    <el-table
        :data="tableData"
        border
        style="width: 100%;">
      <el-table-column
          fixed
          prop="date"
          label="柜机编码"
          width="150">
        <template slot-scope="scope">
          <span v-if="!editStatus">{{scope.row.data}}</span>
          <el-input v-else v-model="scope.row.data" placeholder="请填写" style="width: 100px"></el-input>
        </template>
      </el-table-column>
      <el-table-column
          prop="name"
          label="所在地"
          width="120">
      </el-table-column>
      <el-table-column
          prop="province"
          label="详细地址"
          width="120">
      </el-table-column>
      <el-table-column
          prop="city"
          label="设备型号"
          width="120">
      </el-table-column>
      <el-table-column
          prop="address"
          label="存藏类型"
          width="300">
      </el-table-column>
      <el-table-column
          prop="zip"
          label="MAC"
          width="120">
      </el-table-column>
      <el-table-column
          prop="zip"
          label="安装日期"
          width="120">
      </el-table-column>
      <el-table-column
          prop="zip"
          label="是否开通"
          width="120">
      </el-table-column>
      <el-table-column
          prop="zip"
          label="开通时间"
          width="120">
      </el-table-column>
      <el-table-column
          fixed="right"
          label="操作"
          width="100">
        <template slot-scope="scope">
          <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button>
          <el-button type="text" size="small">编辑</el-button>
        </template>
      </el-table-column>
    </el-table>
    <el-form-item style="margin-top: 10px">
      <el-button type="primary" @click="onSubmit">确认</el-button>
      <el-button>取消</el-button>
    </el-form-item>
  </el-card>
</div>
</template>

<script>
export default {
  methods: {
    handleClick(row) {
      console.log(row);
    }
  },
  onSubmit() {
    console.log('submit!');
  },

  data() {
    return {
      tableData: [],
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      }
    }
  }
}

</script>

<style scoped>

</style>